package app

//import (
//	"server/internal/model"
//)
//
//type Email struct {
//	User    model.User
//	Host    string
//	ToEmail string //邮件接受人
//	body    string //邮件内容
//	subject string //邮件标题
//	Port    string //邮件服务器端口
//}

//func SendEmail(email Email) {
//	auth := smtp.PlainAuth("", email.User.UserName, email.User.PassWord, email.Host)
//	msg := []byte(fmt.Sprintf("To:%s Subject:%s %s", email.ToEmail, email.subject, email.body))
//	err := smtp.SendMail(email.Host+":"+email.Port, auth, email.User.UserName, []string{email.ToEmail}, msg)
//	if err != nil {
//		fmt.Println("邮件发送失败：", err)
//		return
//	}
//	fmt.Println("邮件发送成功")
//}
